package com.netease.pris.activity.view;

import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.net.Uri;
import android.os.SystemClock;

public class AdBar$AdBroadcast extends BroadcastReceiver
{
  private static final String a = "com.android.im.intent.action.HEARTBEAT";
  private static final Uri b = Uri.parse("content://im/heartbeat");
  private static final String c = "vnd.android.im/heartbeat";
  private static boolean d = false;
  private final Context e;
  private final AlarmManager f;
  private PendingIntent g;
  private bg h;

  public AdBar$AdBroadcast(Context paramContext)
  {
    this.e = paramContext;
    this.f = ((AlarmManager)paramContext.getSystemService("alarm"));
  }

  /** @deprecated */
  public void a()
  {
    monitorenter;
    try
    {
      this.h = null;
      if (d)
      {
        this.e.unregisterReceiver(this);
        d = false;
      }
      a(this.g);
      monitorexit;
      return;
    }
    finally
    {
      localObject = finally;
      monitorexit;
    }
    throw localObject;
  }

  /** @deprecated */
  void a(PendingIntent paramPendingIntent)
  {
    monitorenter;
    try
    {
      this.f.cancel(paramPendingIntent);
      monitorexit;
      return;
    }
    finally
    {
      localObject = finally;
      monitorexit;
    }
    throw localObject;
  }

  /** @deprecated */
  void a(PendingIntent paramPendingIntent, long paramLong)
  {
    monitorenter;
    try
    {
      long l = paramLong + SystemClock.elapsedRealtime();
      this.f.set(2, l, paramPendingIntent);
      monitorexit;
      return;
    }
    finally
    {
      localObject = finally;
      monitorexit;
    }
    throw localObject;
  }

  /** @deprecated */
  public void a(bg parambg, long paramLong)
  {
    monitorenter;
    try
    {
      a(this.g);
      Uri localUri = ContentUris.withAppendedId(b, 0L);
      Intent localIntent = new Intent("com.android.im.intent.action.HEARTBEAT").setDataAndType(localUri, "vnd.android.im/heartbeat");
      this.g = PendingIntent.getBroadcast(this.e, 0, localIntent, 0);
      if (!d)
      {
        this.e.registerReceiver(this, IntentFilter.create("com.android.im.intent.action.HEARTBEAT", "vnd.android.im/heartbeat"));
        d = true;
      }
      this.h = parambg;
      a(this.g, paramLong);
      monitorexit;
      return;
    }
    finally
    {
      localObject = finally;
      monitorexit;
    }
    throw localObject;
  }

  public void onReceive(Context paramContext, Intent paramIntent)
  {
    if (this.h != null)
      this.h.a();
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.activity.view.AdBar.AdBroadcast
 * JD-Core Version:    0.6.0
 */